package com.xxx.service.impl;

import com.xxx.entity.Goods;
import com.xxx.mapper.GoodsMapper;
import com.xxx.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public List<Goods> findAll() {
        return goodsMapper.findAll();
    }

    @Override
    public Goods find(Integer goodsId) {
        return goodsMapper.find(goodsId);
    }

    @Override
    public int add(Goods goods) {
        return goodsMapper.add(goods);
    }

    @Override
    public int update(Goods goods) {
        return goodsMapper.update(goods);
    }
}
